<script setup lang="ts">

import { ref } from "vue";

interface Todo {
  id: string;
  name: string;
  price: number;
}

const list = ref<Todo[]>([]);
list.value=[
  {
    id: "1001",
    name:"男士鞋子",
    price:280
  },
  {
    id: "1002",
    name:"男士卫衣",
    price:180
  },
]
</script>

<template>
<!--结构 -->

<ul>
  <li v-for="item in list" :key="item.id">
    <p>{{item.id}}-{{ item.name }}-{{ item.price }}</p>
  </li>
</ul>
</template>

<style scoped>
/*样式*/
</style>